home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #14
/
Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO
/
os2
/
chgctl21.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-01-03
|
8KB
|
262 lines
/************************************************************
Change Controls Installation Program 2.1
*************************************************************/
'@echo off'
'ansi on'
'cls'
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
call startups 'Checking files in directory'
say'Checking for files...'
call check 'BUTTONS.BMP'
call check 'chg_ctls.cmd'
call check 'chg_pm.exe'
call check 'chg_pm.HLP'
call check 'chg_pm.INF'
call check 'ctls.RC'
call check 'ctls.RES'
call check 'down.bmp'
call check 'down_d.bmp'
call check 'down_g.bmp'
call check 'HIDE_D.BMP'
call check 'HIDE_U.BMP'
call check 'left.bmp'
call check 'left_d.bmp'
call check 'left_g.bmp'
call check 'list.BMP'
call check 'logos.zip'
call check 'maxi_d.bmp'
call check 'maxi_up.bmp'
call check 'max_d.BMP'
call check 'max_u.bmp'
call check 'min_d.bmp'
call check 'min_up.BMP'
call check 'motif.zip'
call check 'npswpscb.bmp'
call check 'npswpscb.txt'
call check 'rdc.cmd'
call check 'readme.cmd'
call check 'REBUILD.CMD'
call check 'resmgr.cmd'
call check 'RESMGR.ZIP'
call check 'right.bmp'
call check 'right_d.bmp'
call check 'right_g.bmp'
call check 'source.zip'
call check 'swap_dll.exe'
call check 'swap_dll.txt'
call check 'sys_d_l.bmp'
call check 'sys_d_s.bmp'
call check 'sys_u_l.bmp'
call check 'sys_u_s.bmp'
call check 'up.bmp'
call check 'up_d.bmp'
call check 'up_g.bmp'
say 'All files found.'
'@pause'
call startups ' '
say 'You will need about 2.1 megs available space to run Change Controls'
say 'Hit [ENTER] to Install Change Controls. [Control-C to Abort]'
say ''
pull dummy .
say ''
instdir='C:\chg_ctls'
exename='chg_pm.exe'
call startups 'Installation directory'
say 'The default installation directory for Change Controls is ' instdir
say 'Did you want to install to another directory? [N]'
parse upper pull dummy
if dummy = 'Y' then do
say 'Enter your new installation path :'
parse upper pull instdir
end
call checkdir instdir
say ''
call startups 'Installing files...'
say 'Copying files...'
'copy BUTTONS.BMP' instdir
'copy chg_ctls.cmd' instdir
'copy chg_pm.exe' instdir
'copy chg_pm.HLP' instdir
'copy chg_pm.INF' instdir
'copy ctls.RC' instdir
'copy ctls.RES' instdir
'copy down.bmp' instdir
'copy down_d.bmp' instdir
'copy down_g.bmp' instdir
'copy HIDE_D.BMP' instdir
'copy HIDE_U.BMP' instdir
'copy left.bmp' instdir
'copy left_d.bmp' instdir
'copy left_g.bmp' instdir
'copy list.BMP' instdir
'copy logos.zip' instdir
'copy maxi_d.bmp' instdir
'copy maxi_up.bmp' instdir
'copy max_d.BMP' instdir
'copy max_u.bmp' instdir
'copy min_d.bmp' instdir
'copy min_up.BMP' instdir
'copy motif.zip' instdir
'copy npswpscb.bmp' instdir
'copy npswpscb.txt' instdir
'copy rdc.cmd' instdir
'copy readme.cmd' instdir
'copy REBUILD.CMD' instdir
'copy resmgr.cmd' instdir
'copy RESMGR.ZIP' instdir
'copy right.bmp' instdir
'copy right_d.bmp' instdir
'copy right_g.bmp' instdir
'copy source.zip' instdir
'copy swap_dll.exe' instdir
'copy swap_dll.txt' instdir
'copy sys_d_l.bmp' instdir
'copy sys_d_s.bmp' instdir
'copy sys_u_l.bmp' instdir
'copy sys_u_s.bmp' instdir
'copy up.bmp' instdir
'copy up_d.bmp' instdir
'copy up_g.bmp' instdir
say 'Done Copying.'
'@pause'
dlldir='C:\os2\dll'
call startups 'Looking for pmmerge.dll'
say 'Is your OS2 dll Directory [ c:\os2\dll ]? [Y]:'
parse upper pull dummy
if dummy = 'N' then do
say 'Enter your OS2 dll Directory:'
parse upper pull dlldir
end
call checkdir dlldir
say ''
say 'Copying pmmerge.dll ...'
'copy 'dlldir'\pmmerge.dll' instdir
cfgsys='c:'
call startups 'Adding Swap Dll Utility to config.sys'
say 'Automatically add the Swap Dll utility to your config.sys?[N]:'
parse upper pull dummy
if dummy = 'Y' then do
say 'What drive is OS2 installed on?'
say '(Must have colon after drive letter example-> c: ): '
parse upper pull cfgsys
say 'making a backup of config.sys called config.chg...'
'copy ' cfgsys'\config.sys' cfgsys'\config.chg'
say 'adding swap dll utility to your config.sys...'
call lineout cfgsys'\config.sys','call='instdir'\swap_dll.exe /c'cfgsys'\os2\cmd.exe /s'instdir' /d'dlldir' /w5'
'@pause'
end
call startups 'Creating WPS Objects'
call SysDestroyObject('<chg_Folder>')
say "Creating a folder for Change Controls..."
title = "Change Controls"
classname = 'WPFolder'
location = '<WP_DESKTOP>'
setup = 'OBJECTID=<chg_Folder>;OPEN=DEFAULT'
call SysCreateObject classname,title,location,setup,f
say 'Creating the program and readme objects...'
title = "Change Controls 2.1"
classname = 'WPProgram'
location = '<chg_Folder>'
setup = 'EXENAME='instdir'\'exename';PARAMETERS=%*;STARTUPDIR='instdir
call SysCreateObject classname,title,location,setup,u
title = "Readme for Change Controls"
classname = 'WPProgram'
location = '<chg_Folder>'
setup = 'EXENAME='instdir'\readme.cmd;PARAMETERS=%*;STARTUPDIR='instdir
call SysCreateObject classname,title,location,setup,u
say 'Finished Installing Change Controls.'
say 'Starting the Viewer on Help file'
say 'Some last minute changes to the help file:'
say ' '
say 'You no longer need to manually copy pmmerge.dll into the install directory'
say 'Also, the swap_dll.exe utility was automatically added to your config.sys'
say 'if you allowed this install program to do it.'
'@pause'
'view chg_pm'
exit
check: procedure
rc = stream(ARG(1),'c','query exists')
if rc = '' then
do
call startups '!!!!!!!!!! ERROR !!!!!!!!!!'
say 'The file 'ARG(1)' was not found.'
say 'This program must be run from the directory where you unpacked the archive.'
'@pause'
exit
end
return
check2: procedure
rc = stream(instdir'\'ARG(1),'c','query exists')
if rc = '' then
do
call startups '!!!!!!!!!! ERROR !!!!!!!!!!'
say 'The file 'ARG(1)' was not correctly copied.'
say 'Not a huge problem, but you will have to manually copy'
say 'pmmerge.dll into the install directory before running Change Controls'
'@pause'
end
if rc <> '' then
do
say '--Last minute correction to the Installation Instructions in the manual--'
say 'You no longer need to manually copy pmmerge.dll'
'@pause'
end
return
checkdir: procedure
parse upper arg DIR;
curdir=directory()
tstdir=directory(DIR);
if tstdir\=DIR then
do
'mkdir 'DIR
end
tstdir=directory(DIR);
if tstdir\=DIR then
do
call startups '!!!!!!!!!! ERROR !!!!!!!!!!'
say 'You specified an invalid path.'
say tstdir ' -' DIR
say 'Run the installation program again after this problem is fixed.'
tstdir=directory(curdir)
'@pause'
exit
end
tstdir=directory(curdir)
return
startups: procedure
call SysCls
say'
┌────────────────────────────────────────────────────────────────────────────┐'
say'│
▄█▀▄█ ▀██C▄C
│'
say'│
▐█▌ █ ██ ▄▄ ▄▄▄ ▄ ▄▄▄ ▄▄▄▀ ▄▄▄C
│'
say'│
██C██▀ ██ ▀▀▄██ ██ ██ ██ ██ ▄██ ██C
│'
say'│
▐█▌C██ ██ ▄█ ██ ██ ██ ▀█▄█▀ ██▀▀▀▀C
│'
say'│
▀█▄▄▀ ▄██ ██▄ ▀█▄▀▀▄ ▄██ ██▄ ▄▀██▄ ▀█▄▄▀C
│'
say'│C
██ ██C
│'
say'│C
▀██▄█▀C
(
C
)
1995
M
att
S
chellhaas
│'
say'│
▄█▀▄█C▄C▀██C
│'
say'│
▐█▌ █ ▄▄▄ ▄ ▄▄▄ ██ ▄ ▄▄▄ ▄▄▄ ██ ▄▄▄C
│'
say'│
██C██ ██ ██ ██ ▀██▀ ██ ██ ██ ██ ██ ▀██▄C
│'
say'│
▐█▌ ██ ██ ██ ██ ██ ██ ██ ██ ██ ▀██C
│'
say'│
▀█▄▄▀ ▀█▄█▀ ▄██ ██▄ ▀█▄▀ ▄██ ▀█▄█▀ ▄██▄ ▀▄▄█▀C
│'
say'│C│'
say'│CInstallationC
│'
say'└────────────────────────────────────────────────────────────────────────────┘'
say''
say' 'ARG(1)
say ''
return